import 'dart:convert';

/// id : "12"
/// createTime : "2023-04-15T13:25:33"
/// updateTime : "2023-04-15T13:25:33"
/// createName : "谢瑶"
/// updateName : "谢瑶"
/// isDeleted : true
/// jumpUrl : "https://www.baidu.co"
/// msg : "点击跳转百度"

NoticeBean noticeBeanFromJson(String str) =>
    NoticeBean.fromJson(json.decode(str));

String noticeBeanToJson(NoticeBean data) => json.encode(data.toJson());

class NoticeBean {
  NoticeBean({
    String? id,
    String? createTime,
    String? updateTime,
    String? createName,
    String? updateName,
    bool? isDeleted,
    String? jumpUrl,
    String? msg,
  }) {
    _id = id;
    _createTime = createTime;
    _updateTime = updateTime;
    _createName = createName;
    _updateName = updateName;
    _isDeleted = isDeleted;
    _jumpUrl = jumpUrl;
    _msg = msg;
  }

  NoticeBean.fromJson(dynamic json) {
    _id = json['id'];
    _createTime = json['createTime'];
    _updateTime = json['updateTime'];
    _createName = json['createName'];
    _updateName = json['updateName'];
    _isDeleted = json['isDeleted'];
    _jumpUrl = json['jumpUrl'];
    _msg = json['msg'];
  }

  String? _id;
  String? _createTime;
  String? _updateTime;
  String? _createName;
  String? _updateName;
  bool? _isDeleted;
  String? _jumpUrl;
  String? _msg;

  NoticeBean copyWith({
    String? id,
    String? createTime,
    String? updateTime,
    String? createName,
    String? updateName,
    bool? isDeleted,
    String? jumpUrl,
    String? msg,
  }) =>
      NoticeBean(
        id: id ?? _id,
        createTime: createTime ?? _createTime,
        updateTime: updateTime ?? _updateTime,
        createName: createName ?? _createName,
        updateName: updateName ?? _updateName,
        isDeleted: isDeleted ?? _isDeleted,
        jumpUrl: jumpUrl ?? _jumpUrl,
        msg: msg ?? _msg,
      );

  String? get id => _id;

  String? get createTime => _createTime;

  String? get updateTime => _updateTime;

  String? get createName => _createName;

  String? get updateName => _updateName;

  bool? get isDeleted => _isDeleted;

  String? get jumpUrl => _jumpUrl;

  String? get msg => _msg;

  Map<String, dynamic> toJson() {
    final map = <String, dynamic>{};
    map['id'] = _id;
    map['createTime'] = _createTime;
    map['updateTime'] = _updateTime;
    map['createName'] = _createName;
    map['updateName'] = _updateName;
    map['isDeleted'] = _isDeleted;
    map['jumpUrl'] = _jumpUrl;
    map['msg'] = _msg;
    return map;
  }
}
